<template>
	
	<div>
		<div style="padding: 10px;"  v-html="article"></div>
		<div style="width: 100%;padding-bottom: 3rem;">
			<div @click="toBack" style="width: 14rem;background: #FF9913;height: 2rem;margin: auto;text-align: center;color: #fff;border-radius: 0.3rem;">返回</div>
		</div>
	</div>

    
    
    
  
</template>

<script>


export default {
	
	data () {
		
	    return {
	      
	      article:'',
	      lesson_id:this.$route.params.lesson_id,
	      access_token:''
	     
	    }
	},
	
	methods:{
		
		//获取详情
	    getDetail(){
	    	  
			this.$store.commit('updateLoadingStatus',true);
			  
	    	this.$http.get(this.$store.state.api + 'index/lesson-detail&access_token=' + this.access_token + '&lesson_id=' + this.lesson_id)
		    .then((response) => {
		    		
		    console.log(response)
				
				if(response.body.code == 0) {
					
					this.article = response.body.data.content
					console.log(this.article)
					
				} else {
					
				}
					
				
				this.$store.commit('updateLoadingStatus',false);		
				
			  }, (response) => {
	             
	             
			  });
	    },
	    
	    //返回
	    toBack(){
	    	
	    	this.$router.push({ path: '/moviesList'});
	    	
	    }
		
		
	},
	
	mounted() {
		
		this.access_token = this.$store.state.access_token
		
		console.log(this.lesson_id)

        this.getDetail();

  },
	
	
	
}


</script>

<style>
	
	html,body{
		width: 100%;
	}
	img{
		width: 100%;
	}
	
</style>